﻿using System;
using ASPNETVN.PORTAL.Components.Helpers;
using ASPNETVN.PORTAL.Components.UI;
using ASPNETVN.PORTAL.Modules.ACTP.Components;

namespace ASPNETVN.PORTAL.Modules.ACTP.Controls
{
    public partial class EmployeeDetail : ModulePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                // Employee Detail.
                EmployeeDetailControl1.EmplopyeeID = this.ItemID;

                gvList.DataSource = Certification.SelectCollectionBy_EmployeeID(this.ModuleID, this.ItemID);
                gvList.DataBind();
            }
        }

        protected void btnAssignCertificationToEmployee_Click(object sender, EventArgs e)
        {
            string url = HttpUrlBuilder.BuildAddEditUrl(this.ModuleID, 0, "AssignCertificationToEmployee", "employeeid={0}", this.ItemID);
            Response.Redirect(url);
        }
    }
}